home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / Make / source / Makefile.am < prev    next >
Encoding:
Makefile  |  1997-09-19  |  3.0 KB  |  99 lines

  1. # -*-Makefile-*-, or close enough
  2.  
  3. AUTOMAKE_OPTIONS = 1.2
  4.  
  5. bin_PROGRAMS =    make
  6.  
  7. make_SOURCES =    main.c commands.c job.c dir.c file.c misc.c read.c remake.c \
  8.         rule.c implicit.c default.c variable.c expand.c function.c \
  9.         vpath.c version.c ar.c arscan.c remote-$(REMOTE).c \
  10.         commands.h dep.h filedef.h job.h make.h rule.h variable.h \
  11.         signame.c signame.h \
  12.         getopt.c getopt1.c getopt.h
  13. make_LDADD =    @LIBOBJS@ @ALLOCA@ glob/libglob.a
  14.  
  15. info_TEXINFOS =    make.texinfo
  16.  
  17. INCLUDES =    -I$(srcdir)/glob -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\"
  18.  
  19. BUILT_SOURCES =    README build.sh.in
  20.  
  21. EXTRA_DIST =     make.man $(BUILT_SOURCES) remote-cstms.c\
  22.         make-stds.texi texinfo.tex SCOPTIONS SMakefile\
  23.         README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\
  24.         README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
  25.         README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\
  26.         readme.vms makefile.vms makefile.com config.h-vms vmsdir.h\
  27.         vmsfunctions.c vmsify.c
  28.  
  29. SUBDIRS =    glob
  30.  
  31. MOSTLYCLEANFILES = loadavg.c
  32. CLEANFILES =    loadavg
  33.  
  34. # --------------- Local DIST Section
  35.  
  36. # Install the w32 subdirectory
  37. #
  38. dist-hook:
  39.     (cd $(srcdir); \
  40.      w32=`find w32 -follow \( -name CVS -prune \) -o -type f -print`; \
  41.      tar chf - $$w32) \
  42.     | (cd $(distdir); tar xfBp -)
  43.  
  44.  
  45. # --------------- Local CHECK Section
  46.  
  47. check-local: check-loadavg check-regression
  48. .PHONY: check-loadavg check-regression
  49.  
  50. # > check-loadavg
  51. #
  52. loadavg: loadavg.c config.h
  53.     @rm -f loadavg
  54.     $(LINK) -I. -I$(srcdir) -DHAVE_CONFIG_H -DTEST $(make_LDFLAGS) loadavg.c $(LIBS)
  55. # We copy getloadavg.c into a different file rather than compiling it
  56. # directly because some compilers clobber getloadavg.o in the process.
  57. loadavg.c: getloadavg.c
  58.     ln $(srcdir)/getloadavg.c loadavg.c || \
  59.     cp $(srcdir)/getloadavg.c loadavg.c
  60. check-loadavg: loadavg
  61.     @echo The system uptime program believes the load average to be:
  62.     -uptime
  63.     @echo The GNU load average checking code believes:
  64.     -./loadavg
  65.  
  66. # > check-regression
  67. #
  68. # Look for the make test suite, and run it if found.  Look in MAKE_TEST if
  69. # specified, or else in the srcdir or the distdir, their parents, and _their_
  70. # parents.
  71. #
  72. check-regression: all
  73.     here=`pwd`; testdir=""; \
  74.       case "$(MAKE_TEST)" in "") \
  75.         for d1 in $$here $(srcdir); do \
  76.           for d2 in ../.. .. .; do \
  77.         all=`echo $$d1/$$d2/make-test-[0-9]*/run_make_tests`; \
  78.         case "$$all" in \
  79.           "$$d1/$$d2/make-test-[0-9]*/run_make_tests") : ;; \
  80.           *) try=`for x in $$all; do echo $$x; done | sort | tail -1`;\
  81.              testdir=`dirname $$try` ;; esac; \
  82.             done; done ;; \
  83.         *) testdir="$(MAKE_TEST)" ;; \
  84.       esac; \
  85.       case "$$testdir" in \
  86.         "") echo "Couldn't find make-test-* test suite."; exit 0;; \
  87.       esac; \
  88.       echo "cd $$testdir && ./run_make_tests -make_path $$here/make"; \
  89.       cd $$testdir && ./run_make_tests -make_path $$here/make
  90.  
  91.  
  92. # --------------- Maintainer's Section
  93.  
  94. if MAINT_MAKEFILE
  95. # Note this requires GNU make.  Not to worry, since it will only be included
  96. # in the Makefile if we're in the maintainer's environment.
  97. include $(srcdir)/maintMakefile
  98. endif
  99.